<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css"/>
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
</head>

<script>
    var pnum = {$pnum};
    var filter = {$filter};
    {if condition="(!isset($search)) OR (!$search)"}
        var url = "/{$Request.module}/distribution_withdraw/lst/filter/"+filter+".html?page="+pnum;
    {else/}
        var url = "/{$Request.module}/distribution_withdraw/search.html?page="+pnum;
    {/if}
</script>

<body class="gray-bg">
<style>
    input.error{
        border:1px solid red;
    }
    span.error{
        padding-top:10px;
        color: #f00;
        font-size:12px;
    }
</style>

    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>分销商提现审核</h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" id="form">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">流水单号：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.tx_number}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                            <label class="col-sm-2 control-label">申请时间:</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.create_time}</div>
                                </div> 
                            </div>				
                            <div class="hr-line-dashed"></div>
                        
                        
                            <div class="form-group">
                                <label class="col-sm-2 control-label">分销商姓名：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.real_name}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">手机号：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.phone}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">可提现余额：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.withdraw_amount}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">提现金额：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$withdraw_info.amount}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">银行卡号：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$bank_info.card_number}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">所属银行：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$bank_info.bank_name}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">开户行省市区：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$bank_info.province}{$bank_info.city}{$bank_info.area}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">所属支行：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$bank_info.branch_name}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">真实姓名：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$bank_info.name}</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否通过审核：</label>
                                <div class="col-sm-6">
                                        <label class="radio-inline"><input type="radio" name="status" {if condition="$withdraw_info['status'] eq 1"}checked="checked"{/if} value="1">是</label>
                                        <label class="radio-inline"><input type="radio" name="status" {if condition="$withdraw_info['status'] eq 2"}checked="checked"{/if} value="2">否</label>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                           
                           <input type="hidden" name="id" value="{$withdraw_info.id}" />
                           <input type="hidden" name="amount" value="{$withdraw_info.amount}" />
                           <input type="hidden" name="distrib_id" value="{$withdraw_info.distrib_id}" />
                                                               
                           <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="button" id="doSubmit">保存设置</button>
                                    <button class="btn btn-primary" type="button" onclick="goBackLst('/{$Request.module}/distribution_withdraw/lst');">返回</button>
                                </div>
                            </div>
                            
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- 自定义js -->
    <script type="text/javascript" src="__PUBLIC__/uploadify/jquery.uploadify.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>	
    <!-- iCheck -->
    <script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/admin/js/common/ajax.js"></script>

    <script>
        $(function(){ 
            $('#doSubmit').click(function(){
                var shcanshu = $('input:radio[name=status]:checked').val();
                if(shcanshu == null){
                    layer.msg('请选择审核通过或不通过', {icon: 2,time: 1000});
                    return false;
                }

                if('1,2'.indexOf(shcanshu) == -1){
                    layer.msg('参数错误', {icon: 2,time: 1000});
                    return false;
                }

                if(shcanshu == 1){
                    var shuoming = '确定审核通过么？不可撤销';
                }
    		  
                if(shcanshu == 2){
                    var shuoming = '确定审核不通过么？不可撤销';
                }
    		  
                layer.confirm(shuoming, {  			  
                    skin: 'layui-layer-molv',
                    closeBtn: 0,
                    shadeClose : true,
                    btn: ['确定','取消'] //按钮
                },function(){
                    layer.load(2);
                    $.ajax({
                        url:"{:url('distribution_withdraw/checked')}",
                        type:'POST',
                        data:$('#form').serialize(),
                        dataType:'json',
                        success:function(data){
                            if(data.status == 1){
                                layer.closeAll('loading');
                                layer.msg(data.mess, {icon: 1,time: 1000}, function(){
                                    location.href = url;
                                });
                            }else if(data.status == 0){
                                layer.closeAll('loading');
                                layer.msg(data.mess, {icon: 2,time: 1000});
                            }
                        },
                        error:function(){
                            layer.closeAll('loading');
                            layer.msg('操作失败，请重试', {icon: 2,time: 2000});
                        }
                    });
                });
            });
        });
    	
        function cl(){
            location.href = url;
        }
    </script>

</body>
</html>